<?php

namespace app\common\model;

use think\Model;


class White extends Model
{

    

    

    // 表名
    protected $table = 'white';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];


    /**
     * @param string $mobile
     * @param $code
     * @return bool
     * @throws \think\exception\DbException
     */
    public static function verifyMobileWhite(string $mobile, $code): bool
    {
        $white = self::get(['mobile' => $mobile, 'code' => $code]);
        if ($white) {
            return true;
        }
        return false;
    }

    







}
